//
//  XQAboutUsController.m
//  JoinPeso
//
//  Created by 小琦 on 2024/11/20.
//

#import "XQAboutUsController.h"
#import "XQTopCardView.h"

@interface XQAboutUsController ()
@property (nonatomic,strong) XQTopCardView *topView;
@property (nonatomic,strong) UILabel *sectionLb;
@property (nonatomic,strong) UIView *bottomView;
@property (nonatomic,strong) UILabel *bottomLb;
@end

@implementation XQAboutUsController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    [self makeUI];
    [self makeConstraints];
    
}

- (void)makeUI {
    [self.navigationBar setTitle:@"About us"];
    self.view.backgroundColor = kCardColor;
    
    [self.view addSubview:self.topView];
    [self.view addSubview:self.sectionLb];
    [self.view addSubview:self.bottomView];
    [self.bottomView addSubview:self.bottomLb];
}

- (void)makeConstraints {
    [self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo([UIScreen mainScreen].topHeight + 8);
        make.left.right.equalTo(@0);
    }];
    [self.sectionLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.topView.mas_bottom).offset(20);
        make.left.equalTo(@12);
    }];
    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.sectionLb.mas_bottom).offset(20);
        make.left.equalTo(@12);
        make.right.equalTo(@-12);
        make.height.mas_equalTo(273);
    }];
    [self.bottomLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@20);
        make.left.equalTo(@26);
        make.right.equalTo(@-26);
    }];
}

#pragma mark - lazy

- (XQTopCardView *)topView {
    if (!_topView) {
        _topView = [[XQTopCardView alloc] init];
    }
    return _topView;
}

- (UILabel *)sectionLb {
    if (!_sectionLb) {
        _sectionLb = [[UILabel alloc] init];
        _sectionLb.text = @"Our lending platform";
        _sectionLb.textColor = kBlackTextColor;
        _sectionLb.font = [UIFont boldSystemFontOfSize:16];
    }
    return _sectionLb;
}

- (UIView *)bottomView {
    if (!_bottomView) {
        _bottomView = [[UIView alloc] init];
        _bottomView.layer.cornerRadius = 15;
        _bottomView.backgroundColor = [UIColor whiteColor];
    }
    return _bottomView;
}

- (UILabel *)bottomLb {
    if (!_bottomLb) {
        _bottomLb = [[UILabel alloc] init];
        _bottomLb.text = @"Our loan platform providesinstantpersonal loans to address theproblem ofinsuffcient services in india'smassivebanking industry, assist inmicrocredithnancing,and address thefnancialconstraints at hand. We aredevelopingfrom a small loan platform toacomprehensive product loan service";
        _bottomLb.textColor = kBlackTextColor;
        _bottomLb.numberOfLines = 0;
        _bottomLb.textAlignment = NSTextAlignmentCenter;
        _bottomLb.font = [UIFont systemFontOfSize:13];
    }
    return _bottomLb;
}

@end
